The Scripting app supports a set of navigation-related view modifiers that enable developers to control how views are presented within navigation stacks. These modifiers allow for the customization of navigation titles, title display styles, and back button behavior—closely following the conventions of SwiftUI's navigation system.
navigationTitle
Specifies the navigation title of the view.
You can provide either a plain string or a VirtualNode
(such as a Text
component) for advanced formatting.
navigationBarTitleDisplayMode
Controls the display style of the navigation title.
NavigationBarTitleDisplayMode
automatic
: The system chooses the most appropriate display style based on context.large
: Displays the title in a prominent, large style (typically for root views).inline
: Displays the title in-line with the navigation bar controls, using a compact layout.navigationBarBackButtonHidden
Hides or shows the navigation bar back button.
true
, the default back button is not shown for the view.In this example:
"Profile"
and will be shown in the navigation bar.inline
display style.